package com.example.order_system.service;

import com.example.order_system.mapper.OrderDetailMapper;
import com.example.order_system.model.Dish;
import com.example.order_system.model.OrderDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description:
 * @author: chengbaiyi
 * @create: 2022-07-22 19:36
 */
@Service
public class OrderDetailService {
    @Autowired
    private OrderDetailMapper orderDetailMapper;

    public int isUsed(Integer did) {
        return orderDetailMapper.isUsed(did);
    }

    public List<Dish> orderDetail(Integer oid) {
        return orderDetailMapper.orderDetail(oid);
    }

    public int addDetail(Integer oid, Integer did) {
        return orderDetailMapper.addDetail(oid, did);
    }
}
